Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

General Convolution Filter

kConvolveImageFilterType ('genk')

This effect applies a general purpose convolution effect to a single source. The effect that results is completely determined by the values entered into the kernel parameters of the effect. The kernel for this convolution is always a 3-by-3 matrix of values.

The values of the cells of the convolution kernel determine the value that is assigned to each pixel of the destination frame. The convolution algorithm examines every pixel of the source, and the eight pixels surrounding it. These values are multiplied by the appropriate values in the cells and summed. This sum is then used as the value of the corresponding destination pixel.

Many computer graphics textbooks offer a more complete and rigorous explanation of convolution, and you are encouraged to consult these for useful values that the kernel can take. A great introduction to convolution for programmers can be found in High Performance Computer Imaging , Chapter 6, by Ihtisham Kabir, Manning Publications, 1996. ISBN 1-884777-26-0. A somewhat more classical reference is Computer Graphics: Principles and Practice, 2nd. Edition , pp. 629-636, Foley J.D., van Dam A., Feiner S.K. and Hughes J.F., Addison-Wesley, 1990. ISBN 0-201-12110-7

As an example of a kernel that produces a useful result, the following kernel values will shift an image left by one pixel:

The General Convolution Filer effect takes a maximum of one sources and has nine parameters.

Parameters

Use the descriptions below to help you understand what the parameters do. To learn how to use parameter atoms, see "Adding Video Effects to a QuickTime Movie"

Name

Code

QTAtom Type

Description

Cell one

'cel1'

kParameterTypeDataFixed

The value to be placed into the first cell of the kernel.

Cell two

'cel2'

kParameterTypeDataFixed

The value to be placed into the second cell of the kernel.

Cell three

'cel3'

kParameterTypeDataFixed

The value to be placed into the third cell of the kernel.

Cell four

'cel4'

kParameterTypeDataFixed

The value to be placed into the fourth cell of the kernel.

Cell five

'cel5'

kParameterTypeDataFixed

The value to be placed into the fifth cell of the kernel.

Cell six

'cel6'

kParameterTypeDataFixed

The value to be placed into the sixth cell of the kernel.

Cell
seven

'cel7'

kParameterTypeDataFixed

The value to be placed into the seventh cell of the kernel.

Cell eight

'cel8'

kParameterTypeDataFixed

The value to be placed into the eighth cell of the kernel.

Cell nine

'cel9'

kParameterTypeDataFixed

The value to be placed into the ninth cell of the kernel.

The nine cells in the kernel are laid out as follows:


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |